import axios from '@/libs/axios1';
let jsonHeaders = { 'content-type': 'application/json;charset=UTF-8' };
let baseUrl = '/scientific/typeRecord';

// 添加模板类型
export const addTypeRecord = (data) => {
    return axios({
        url: `${baseUrl}`,
        method: 'POST',
        data,
        headers: jsonHeaders
    });
};

// 修改模板类型
export const updateTypeRecord = (id,data) => {
    return axios({
        url: `${baseUrl}/${id}`,
        method: 'PUT',
        data,
        headers: jsonHeaders
    });
};

//删除模板类型
export const delTypeRecord = (id) => {
    return axios({
        url: `${baseUrl}/${id}`,
        method: 'DELETE',
        headers: jsonHeaders
    });
};

//查询模板类型
export const queryTypeRecord = (params) => {
    return axios({
        url: `${baseUrl}/page`,
        method: 'GET',
        params,
        headers: jsonHeaders
    });
};


//查询所有模板类型
export const queryTypeRecordAll = () => {
    return axios({
        url: `${baseUrl}/all`,
        method: 'GET',
        params:{},
        headers: jsonHeaders
    });
};